<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateBannerablesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('bannerables', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->integer('banner_id');
			$table->string('bannerable_id')->comment('对应店铺/机器id');
			$table->string('bannerable_type')->comment('对应店铺/机器类型 Store 、DeviceAccount');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('bannerables');
	}

}
